#ifndef ESTIMATOR_CC
#define ESTIMATOR_CC

#include<string>
#include<fstream>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<iterator>
#include<vector>
#include<map>
#include<cstdlib>
#include<ctime>
#include<cmath>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include "def.hpp"
#include "io.hpp"
#include "utils.hpp"
#include "estimator.hpp"
#include "estimator_polya.cpp"

using namespace std;
int Estimator(){
  int (*Estimator)();

  if(PuzaDEF::Instance()->currentEstimatorType == EST_POLYA){
    allocate_memory<int>(PuzaDEF::Instance()->EST_BUFFER_INT, PuzaDEF::Instance()->EST_Samples, PuzaDEF::Instance()->EST_Polya_K); // allocate memory
    //    cout << "Prepare Input " << endl;
    ReadData<int>(PuzaDEF::Instance()->EST_BUFFER_INT);
    //    exit(0);
    Estimator = &EST_Polya;
  }

  // run estimator
  (*Estimator)();
  return 0;
}
#endif
